<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="ja" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title><s:text name="tiltle_userInfoList"></s:text></title>
    <base target="_self"/>
<style type="text/css">

</style>
<%@ include file="../common/header.jsp"%>
<link href="${appPath}/css/nav.css"rel="stylesheet" type="text/css" />
<link href="${appPath}/css/userInfoList.css"rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${appPath}/js/userInfoList.js"></script>
<script type="text/javascript" src="${appPath}/js/year_month_day.js"></script>
</head>

<body>
<%@ include file="../common/nav.jsp" %>
<div id="content">
<p class="space2"></p>
<h1 class="font1" style="margin-left:50px">
<s:if test='userForModify=="1"'>
<s:text name="title_userInfoList"></s:text>
</s:if>
<s:else>
<s:text name="tiltle_userInfoList">
</s:text>
</s:else>
&nbsp;&nbsp;&nbsp;&nbsp;</h1>
<hr/>
<s:fielderror fieldName="textOverLimit"></s:fielderror>

<s:form action="" id="userForm" enctype="multipart/form-data" method="post" >
<table class="userTable" style="background: white; width:860px;margin-left: auto; margin-right: auto;">

<tr >
 <td height="80px"align="right" class="font1"> <s:text name="label_email"></s:text></td>
  <td height="80px" colspan="2" align="left" >
<s:if test='userForModify=="1"'>
<!--<s:label  name="email" cssClass="emailTxt"></s:label>-->
 <s:textfield type="text" readonly="true"  cssClass="emailTxtNoEdit" id="email" value="%{email}" name="email"  onfocus="this.blur()"/><font color="red">*</font>
</s:if>
<s:else>
  <s:textfield type="text"   cssClass="emailTxt" id="email" value="%{email}" name="email" maxlength="50" onblur="multCheck()"/><font color="red">*</font>
</s:else>
  </td>
 <td colspan="3" align="left">
 <span id="emailWarm"><s:fielderror fieldName="email" cssClass="errormessage"></s:fielderror>
 </span></td>
</tr>
<tr>
<td height="80px" align="right" class="font1"> <s:text name="label_password"></s:text></td>
  <td height="80px" align="left"><s:textfield type="password" cssClass="sTxt" id="password" value="%{password}" name="password" maxlength="20" onblur="insertPassword()"/><font color="red">*</font></td>
<td colspan="4" align="left"> 
<span id="passwordwarm" >
<s:fielderror fieldName="password" cssClass="errormessage"></s:fielderror>
</span>
</td>

</tr>
<tr >
 <td height="80px" align="right" class="font1"> <s:text name="label_passwordCheck"></s:text></td>
  <td height="80px"  align="left" ><s:textfield type="password" cssClass="sTxt" id="passwordSure" name="passwordSure" maxlength="20" onblur="insertAgain()"/><font color="red">*</font></td>
 <td colspan="4" align="left">
  <span id="warm" >
  <s:fielderror fieldName="passwordSure" cssClass="errormessage"></s:fielderror>
</span></td>
</tr>
<tr>
  <td height="80px" align="right" class="font1">姓</td>
  <td height="80px"  align="left">
  <s:textfield type="text" cssClass="sTxt" id="nameKanJiSei" name="nameKanJiSei" value="%{nameKanJiSei}" maxlength="20"/></td>
  <td height="80px" align="right" class="font1">名 </td>
  <td height="80px" colspan="3" align="left" ><s:textfield type="text"  cssClass="sTxt" id="nameKanJiMei" name="nameKanJiMei" value="%{nameKanJiMei}" maxlength="20"/></td>
</tr>

<tr >
  <td height="80px" align="right"  class="font1">姓(ひらがな)
</td>
  <td height="80px"  align="left">
    <s:textfield type="text"  cssClass="sTxt" id="nameKatakanaSei" name="nameKatakanaSei" value="%{nameKatakanaSei}" maxlength="20"/></td>
  <td height="80px"align="right" class="font1">名(ひらがな)
</td>
  <td height="80px" align="left" ><s:textfield type="text"  cssClass="sTxt" id="nameKatakanaMei" name="nameKatakanaMei" value="%{nameKatakanaMei}" maxlength="20"/></td>
 </tr>

<tr >
  <td height="80px" width="220px" align="right"  class="font1">Family Name
</td>
  <td height="80px" align="left" width="180px">
    <s:textfield type="text"  cssClass="sTxt" id="nameEnFamily" name="nameEnFamily" value="%{nameEnFamily}" maxlength="20"/></td>
  <td height="80px"align="right" class="font1" width="150px" >Middle Name
</td>
  <td height="80px" align="left" width="140px"><s:textfield type="text"  cssClass="sTxt" id="nameEnMiddle" name="nameEnMiddle" value="%{nameEnMiddle}" maxlength="20"/></td>
  <td height="80px"align="right" class="font1" width="150px">Last Name</td>
 <td height="80px" width="120px"><s:textfield type="text"  cssClass="sTxt" id="nameEnLast" name="nameEnLast" value="%{nameEnLast}" maxlength="20"/></td>
</tr>

<tr >
<td height="80px"align="right" class="font1"><s:text name="label_sex"></s:text></td>
<td height="80px"  align="left"> 
<s:set name="sex1" value="%{getText('label_man')}"></s:set>
<s:set name="sex2" value="%{getText('label_woman')}"></s:set>
<s:set name="sex3" value="%{getText('label_other')}"></s:set>
<s:radio id="sex"  cssClass="mTxt" name="sex" list="%{#{'0':#sex1,'1':#sex2,'2':#sex3}}" value="%{sex}" theme="simple"></s:radio> 
</td>

<td height="80px" align="right" class="font1"><s:text name="label_birth"></s:text></td>
 <td height="80px"  colspan="3" align="left" >
  <select  id="selYear" name="selYear" class="mTxt">
  </select>
<s:text name="label_yeaar"></s:text>
   <select  id="selMonth" name="selMonth">

  </select>
<s:text name="label_month"></s:text>
    <select id="selDay" name="selDay">

  </select> 
<s:text name="label_day"></s:text>
</td>
</tr>
<s:textfield type="hidden" name="birthday" id="birthday" value="%{birthday}"/>
   <s:textfield type="hidden" name="userId" id="userId" value="%{userId}"/>
<tr >
  <td height="80px" align="right" class="font1"> <s:text name="label_phone"></s:text></td>
  <td height="80px" align="left"><s:textfield type="text" cssClass="sTxt" id="tel" name="tel" value="%{tel}" maxlength="20"/></td>
  <td height="80px" align="right" class="font1"> <s:text name="label_postcode"></s:text></td>
  <td height="80px"  colspan="3" align="left"><s:textfield type="text" cssClass="sTxt" id="zipCode" name="zipCode" value="%{zipCode}" maxlength="10"/></td>
</tr>
<tr >
  <td height="80px" align="right" class="font1"><s:text name="label_areaLevel1"></s:text></td>
  <td height="80px" colspan="5" align="left">
 <s:textfield cssClass="lTxt" id="addProvince" name="addProvince" value="%{addProvince}" maxlength="50"/>
</td>
</tr>

<tr >
<td height="80px" align="right" class="font1"> <s:text name="label_areaLevel2"></s:text></td>
<td height="80px" colspan="5" align="left">
<s:textfield  cssClass="lTxt" id="addCity" name="addCity" value="%{addCity}" maxlength="50"/>
</td>
</tr>

<tr >
  <td height="80px" align="right" class="font1"> <s:text name="label_areaLevel3"></s:text></td>
  <td height="80px" colspan="5" align="left">
 <s:textfield  cssClass="lTxt" id="addOther" name="addOther" value="%{addOther}" maxlength="50"/>
</td>
</tr>

<tr>
  <td height="80px" align="right" class="font1"><s:text name="label_selfIntroduction"></s:text><p><s:text name="label_selfIntroductionNotice"></s:text></p></td>
  <td colspan="5" align="left">
 <s:textarea rows="4" cssClass="mTxt" cols="68" id="selfIntroduction" name="selfIntroduction" value="%{selfIntroduction}" maxlength="180"></s:textarea>
<s:fielderror fieldName="selfIntroduction" cssClass="errormessage1"></s:fielderror>
</td>


</tr>

<tr >
<td height="100px" align="center" colspan="6">
<s:if test='userForModify=="1"'>
<input type="button" id="btnEdit" value="<s:text name="label_modify"></s:text>" class="button1"/>
</s:if>
<s:else>
<input type="button" id="btnSave" value="<s:text name="label_loginButton"></s:text>" class="button1"/>
</s:else>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" id="btnReturn" value="<s:text name="label_backButton"></s:text>" class="button1"/>
</td>
</tr>
</table>

<s:hidden id="emailAgainMsg" value="%{getText('label_emailAgainMsg')}"></s:hidden>
<s:hidden id="passwordSureErrorMsg" value="%{getText('label_passwordSureErrorMsg')}"></s:hidden>
</s:form>
</div>

<p class="space1"></p>
<script type="text/javascript">
$(function(){
var selYear = window.document.getElementById("selYear"); 
var selMonth = window.document.getElementById("selMonth"); 
var selDay = window.document.getElementById("selDay"); 
var modifyflag="<s:property value="userForModify"/>";
var dt;
if(modifyflag=="1"){
	dt=new Date("<s:property value="selYear"/>","<s:property value="selMonth"/>"-1,"<s:property value="selDay"/>");
}
else{
	dt=new Date();
}

new DateSelector(selYear, selMonth ,selDay,dt); 
});
</script>
</body>
</html>